package com.ppx.dao;


import com.ppx.pojo.Info;

import com.ppx.pojo.User;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;

import java.util.*;

/**
 * @author wangxiaotao
 * @create 2021-05-20-14:54
 */
@WebAppConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:config/spring-mybatis.xml"})
public class TestSQL {
    //
    @Autowired
    private InfoDao infoDao;

    @Autowired
    private UserDao userDao;

    @Test
    public void test(){
        List<User> userList = userDao.queryUserByState();
        System.out.println(userList);
    }

    @Test
    public void test1(){
        int userList = userDao.updataUserImg("kNdgh5vtkg.jpeg","123");
        System.out.println(userList);
    }

}
